<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@ include file="/WEB-INF/page/share/taglib.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="/shop/css/vip.css" type="text/css">
<SCRIPT language=JavaScript src="/shop/js/FoshanRen.js"></SCRIPT>
<SCRIPT language=JavaScript src="/shop/js/xmlhttp.js"></SCRIPT>

<SCRIPT language=JavaScript>
function checkIt(){
	var objForm = document.forms[0];
	var form = opener.document.forms[0];
	if (form){
		form.brandid.value = objForm.dicId.value;
		form.brandid2.value = objForm.dicName.value;
	}
	window.close();
}
function getDicName(dicId,strDicName){
	var objForm = document.forms[0];
	objForm.dicId.value = dicId;
	objForm.dicName.value = strDicName;
}
function getTypeList(typeid){
		var typecontent = document.getElementById('typecontent');
		if(typecontent){
			typecontent.innerHTML= "数据正在加载...";
			send_request(function(value){typecontent.innerHTML=value}, '<html:rewrite action="/control/product/type/manage"/>?method=gettypelist&typeid='+ typeid, true);
		}
}
//到指定的分页页面
function topage(page){
	var form = document.forms[0];
	form.page.value=page;
	form.submit();
}
</SCRIPT>
<style>
<!--
.inputText{
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #666666;
	border: 1px solid #999999;
}
body {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 12px;
	color: #666666;
}
-->
</style>
<title>品牌类型列表</title>

</head>
<body>
<c:set var="menuout" value=""/>
<c:forEach items="${menutypes}" var="menu">
	<c:set var="menuout" value="&gt;&gt;<a href='/shop/control/brand/type/manage.do?method=selectUI&typeid=${menu.typeid}'>${menu.name}</a> ${menuout}"/>
</c:forEach>
品牌类型列表,请选择分类:<br>
导航:<a href='<html:rewrite action="/control/brand/type/manage"/>?method=selectUI'>顶级目录</a> <c:out value="${menuout}" escapeXml="false"/>
<form method="post" name="main" action="<html:rewrite action="/control/brand/type/manage"/>">
  <input type="hidden" name="dicId" />
  <input type="hidden" name="dicName"/>
  <input type="hidden" name="method" value="selectUI"/> 
<input type="hidden" name="typeid" value="${param.typeid }"/>
<input type="hidden" name="page" value=""/>
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
			
				<td colspan="5">
				<font color="#FF0066">
	    当前页:第${brands.currentpage}页 | 总记录数:${brands.totalrecord}条 | 每页显示:${brands.maxresult}条 | 总页数:${brands.totalpage}页</font>　
	<c:forEach begin="${brands.pageindex.startindex}" end="${brands.pageindex.endindex}" var="wp">
	    <c:if test="${brands.currentpage==wp}"><b><font color="#000099">第${wp}页</font></b></c:if>
	    <c:if test="${brands.currentpage!=wp}"><a href="javascript:topage('${wp}')" class="a04">第${wp}页</a></c:if>
	</c:forEach></td>
			</tr>
	<tr>
		<td id="typecontent">
			<table width="100%" border="0">
			<tr>
			<c:forEach items="${pageView.records}" var="type" varStatus="loop">		
			    <td>
				<c:if test="${fn:length(type.childtypes)>0}">
				<c:if test="${param.typeid == type.typeid}"><font color="#FF9900"><b>${type.name}</b></font></c:if>
				<c:if test="${param.typeid != type.typeid}"><a href="<html:rewrite action="/control/brand/type/manage"/>?method=selectUI&typeid=${type.typeid}"><b>${type.name}</b></a></b></c:if>
				</c:if>
				<c:if test="${fn:length(type.childtypes)==0}"> ${type.name}</c:if>
				</td>
				<c:if test="${loop.count%5==0}"></tr><tr></c:if>
			</c:forEach>
			</tr>
			<tr>
			<c:forEach items="${brands.records}" var ="brand" varStatus="loop">
				<td>
				<INPUT TYPE="radio" NAME="type" onclick="getDicName('${brand.code}','${brand.name}')"><img width = "50px" height="25px" title="${brand.name}" src="/shop${brand.logopath}">
				<c:if test="${loop.count%5==0}"></tr><tr></c:if>
				</td>
			</c:forEach>
			</tr>
			<tr>
			
				<td colspan="5">
				<font color="#FF0066">
	    当前页:第${brands.currentpage}页 | 总记录数:${brands.totalrecord}条 | 每页显示:${brands.maxresult}条 | 总页数:${brands.totalpage}页</font>　
	<c:forEach begin="${brands.pageindex.startindex}" end="${brands.pageindex.endindex}" var="wp">
	    <c:if test="${brands.currentpage==wp}"><b><font color="#000099">第${wp}页</font></b></c:if>
	    <c:if test="${brands.currentpage!=wp}"><a href="javascript:topage('${wp}')" class="a04">第${wp}页</a></c:if>
	</c:forEach></td>
			</tr>
			</table>
		</td>
	</tr>
	<tr><td colspan="2" align="center">
		<input type='button' name='create' value=" 确 认 " onClick="javascript:checkIt()">
		<input type='button' name="cancel" onClick="javaScript:window.close()" value=" 取 消 "> 
    </td></tr>
</table>
</form>
</body>
</html>